Update Cargo to rust master
authorAlex Crichton <alex@alexcrichton.com>
Wed, 13 May 2015 04:22:14 +0000 (21:22 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 13 May 2015 04:22:14 +0000 (21:22 -0700)
There was a lifetime parameter regression in git2-rs which prevented Cargo from
building on nightly

Cargo.lock
Cargo.toml
src/cargo/sources/git/utils.rs
src/rustversion.txt
tests/support/mod.rs
tests/test_cargo_build_auth.rs
tests/tests.rs

index 0571e5198ee3c388785fc57ed4fbbae0b211abf5..9ca3379accd46d16e7ea6c7430ff8f01a71ec72b 100644 (file)
@@ -3,16 +3,17 @@ name = "cargo"
 version = "0.2.0"
 dependencies = [
  "advapi32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "bufstream 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "curl 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "docopt 0.6.64 (registry+https://github.com/rust-lang/crates.io-index)",
  "env_logger 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "flate2 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "git2-curl 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "glob 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)",
  "kernel32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "regex 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -25,7 +26,7 @@ dependencies = [
  "threadpool 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
  "toml 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
  "winapi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -42,16 +43,21 @@ name = "bitflags"
 version = "0.1.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
+[[package]]
+name = "bufstream"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
 [[package]]
 name = "curl"
 version = "0.2.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "curl-sys 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -59,10 +65,10 @@ name = "curl-sys"
 version = "0.1.21"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -89,7 +95,7 @@ name = "flate2"
 version = "0.2.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "miniz-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
@@ -100,13 +106,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "git2"
-version = "0.2.9"
+version = "0.2.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "libgit2-sys 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libgit2-sys 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -115,9 +121,9 @@ version = "0.2.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "curl 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "git2 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "git2 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "url 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)",
+ "url 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -140,19 +146,19 @@ dependencies = [
 
 [[package]]
 name = "libc"
-version = "0.1.6"
+version = "0.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "libgit2-sys"
-version = "0.2.12"
+version = "0.2.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "libssh2-sys 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -168,10 +174,10 @@ name = "libssh2-sys"
 version = "0.1.22"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "libz-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
  "openssl-sys 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -179,8 +185,8 @@ name = "libz-sys"
 version = "0.1.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -188,7 +194,7 @@ name = "log"
 version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -202,7 +208,7 @@ version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -211,7 +217,7 @@ version = "0.1.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -220,14 +226,14 @@ version = "0.6.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
  "libressl-pnacl-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "pkg-config 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "pkg-config 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "pkg-config"
-version = "0.3.3"
+version = "0.3.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
@@ -243,7 +249,7 @@ name = "rand"
 version = "0.3.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -279,7 +285,7 @@ name = "tar"
 version = "0.2.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -310,7 +316,7 @@ version = "0.1.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "gcc 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
@@ -323,7 +329,7 @@ dependencies = [
 
 [[package]]
 name = "url"
-version = "0.2.31"
+version = "0.2.34"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
  "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -335,6 +341,6 @@ name = "winapi"
 version = "0.1.17"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 dependencies = [
- "libc 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
+ "libc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
index e7a54b02cc25817bfaa28af3fd1fa7d51763fdc0..d8372805750e7b64df12052ea5e208910fb8147e 100644 (file)
@@ -39,6 +39,7 @@ dependencies = { winapi = "0.1", advapi32-sys = "0.1", kernel32-sys = "0.1" }
 [dev-dependencies]
 tempdir = "0.3"
 hamcrest = { git = "https://github.com/carllerche/hamcrest-rust.git" }
+bufstream = "0.1"
 
 [[bin]]
 name = "cargo"
index 2ce6e42244eb89d5e41e9405688579f62c267548..c1d0b6068cd82ff455fcdf45f6af50ea0d235c8f 100644 (file)
@@ -407,7 +407,7 @@ pub fn fetch(repo: &git2::Repository, url: &str,
         cb.credentials(|a, b, c| f(a, b, c));
         let mut remote = try!(repo.remote_anonymous(&url, Some(refspec)));
         try!(remote.add_fetch("refs/tags/*:refs/tags/*"));
-        remote.set_callbacks(&mut cb);
+        remote.set_callbacks(cb);
         try!(remote.fetch(&["refs/tags/*:refs/tags/*", refspec], None));
         Ok(())
     })
index 29bc1583fbeeac408fd344d76e1f05b134b51994..17c78faed7d7d249f71d34f11bddbbc92bdbe4d4 100644 (file)
@@ -1 +1 @@
-2015-05-03
+2015-05-11
index cda18976c7e09322e87794c42a8aea639a96b3ec..fa004f25478e07c9e384a3c491642b49df8c04e3 100644 (file)
@@ -4,6 +4,7 @@ use std::ffi::OsStr;
 use std::fmt;
 use std::fs;
 use std::io::prelude::*;
+use std::os;
 use std::path::{Path, PathBuf};
 use std::process::Output;
 use std::str;
@@ -65,10 +66,20 @@ impl SymlinkBuilder {
         SymlinkBuilder { dst: dst, src: src }
     }
 
+    #[cfg(unix)]
     fn mk(&self) -> Result<(), String> {
         try!(mkdir_recursive(&self.dirname()));
 
-        fs::soft_link(&self.dst, &self.src)
+        os::unix::fs::symlink(&self.dst, &self.src)
+            .with_err_msg(format!("Could not create symlink; dst={} src={}",
+                                   self.dst.display(), self.src.display()))
+    }
+
+    #[cfg(windows)]
+    fn mk(&self) -> Result<(), String> {
+        try!(mkdir_recursive(&self.dirname()));
+
+        os::windows::fs::symlink_file(&self.dst, &self.src)
             .with_err_msg(format!("Could not create symlink; dst={} src={}",
                                    self.dst.display(), self.src.display()))
     }
index 774ad6526680d00507c85358673b618be8e4fb85..a8e88cbd19adbd514b06e63898c64b06c59bc088 100644 (file)
@@ -1,8 +1,9 @@
 use std::collections::HashSet;
-use std::io::BufStream;
 use std::io::prelude::*;
 use std::net::TcpListener;
 use std::thread;
+
+use bufstream::BufStream;
 use git2;
 
 use support::{project, execs, UPDATING};
index 4d3ff6d771a84afd9f91f657d8d21770b76f9098..1b72798f037bf0e6bece4e2d78d5df258ae72bfc 100644 (file)
@@ -4,6 +4,7 @@ extern crate rustc_serialize;
 extern crate cargo;
 extern crate flate2;
 extern crate git2;
+extern crate bufstream;
 extern crate hamcrest;
 extern crate tar;
 extern crate term;